var WxParse = require('../../wxParse/wxParse.js');
//获取应用实例
const app = getApp();
Page({
	data:{
		imgpath:app.setting.apiimgpath,
		allData:{}
	},
	onLoad:function(option){
	    var that = this;
	    //商品列表
	   	app.request('/api/Goods/getGoodsInfo', {goodsid:option.gid}, function(res){
			if(res.code == '0'){
				WxParse.wxParse('content', 'html', res.data.content, that, 5);
				that.setData({
					allData:res.data
				})
			}
		});
	},
	onShareAppMessage(res){
		return{
			title:this.data.allData.title,
			path:'/pages/integraldetail/integraldetail?gid='+this.data.allData.gid,
			imageUrl:this.data.imgpath + '/' + this.data.allData.photo[0]
		}
	}
})
